package com.common.base;

import com.entity.sys.SysUser;
import org.springframework.beans.factory.annotation.Autowired;


public abstract class BaseController<S extends BaseService, E extends BaseEntity>{

    @Autowired(required=false)
    protected S service;

    public String token(){
        return service.token();
    }

    /**
     * 获取当前登录的用户
     */
    public SysUser getLoginUser(){
        return service.getLoginUser();
    }

    public String loginId(){
        return service.loginId();
    }

}
